package com.beep.erp.model.purchase;

import com.beep.erp.common.base.BaseBean;
import com.beep.erp.common.bean.PurchaseListBean;
import com.beep.erp.http.HttpRetrofit;
import com.beep.erp.http.RetryWhenNetworkException;

import rx.Observable;

/**
 * FileName: PurchaseListModel.java
 * Author: Jolly
 * Date 2018/8/24
 */

public class PurchaseListModel implements PuchaseListContract.Model {
    @Override
    public Observable<PurchaseListBean> getPurchaseData(String sign, String timeStamp, int status, int pageSize, int pageNo) {
        return HttpRetrofit.getInstance().apiService.getPurchaseData(sign, timeStamp, status, pageSize, pageNo).compose(HttpRetrofit.toSubscribe()).compose(HttpRetrofit.toTransformer()).retryWhen(new RetryWhenNetworkException());
    }
}
